package config;

import java.awt.Color;

public class SerializableColor {
    public int r;
    public int g;
    public int b;

    public SerializableColor(Color color)
    {
        this.r = color.getRed();
        this.g = color.getGreen();
        this.b = color.getBlue();
    }

    public static SerializableColor FromColor(Color color)
    {
        return new SerializableColor(color);
    }

    public Color ToColor()
    {
        return new Color(r,g,b);
    }
}
